package com.heima.comment.controller;

import com.heima.comment.pojo.Comment;
import com.heima.comment.pojo.apPageDto;
import com.heima.comment.service.ApCommentService;
import com.heima.common.dtos.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CommentPageController {

    @Autowired
    ApCommentService apCommentService;

    @PostMapping("/api/v1/comment/manage/list")
    public PageResult<Comment> getListPage(@RequestBody apPageDto dto){
        PageResult pageResult = apCommentService.getListPage(dto);
        return pageResult;
    }

}
